package com.io.client;

import java.io.FileInputStream;
import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipInputStream;

/**
 * Created by 41579 on 2017/4/8.
 */
public class Test2 {
    public static void main(String[] args) throws Exception{
        GZIPInputStream gzipInputStream = new GZIPInputStream(new FileInputStream("test.txt"));
        byte[] b = new byte[gzipInputStream.available()];
        while(gzipInputStream.read(b)!=-1)
        {
            System.out.println(new String(b));
        }
    }
}
